package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.inspectionwork;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class InspectionworkService extends BaseService {

	private static final Logger logger = LoggerFactory.getLogger(InspectionworkService.class);

	/**
	 * 检查工作下发列表查询
	 * @param
	 * @return
	 */
	public RespEntity listInspectionworkListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return inspectionworkJava(jsonParam,"listInspectionworkListPage","inspectionwork");
	}

	/**
	 * 检查落实任务列表：单位用
	 * @param
	 * @return
	 */
	public RespEntity workableList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return inspectionworkJava(jsonParam,"workableList","inspectionwork");
	}

	/**
	 * 检查工作下发列表新建
	 * @param
	 * @return
	 */
	public RespEntity add(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return inspectionworkJava(jsonParam,"add","inspectionwork");
	}

	/**
	 * 检查工作删除
	 * @param jsonParam
	 * @return
	 */
	public RespEntity delete(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return inspectionworkJava(jsonParam,"delete","inspectionwork");
	}
	/**
	 * 检查工作下发详情
	 * @param
	 * @return
	 */
	public RespEntity getById(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return inspectionworkJava(jsonParam,"getById","inspectionwork");
	}

	/**
	 * 单位的落实情况列表
	 * @param
	 * @return
	 */
	public RespEntity workableBusinessListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return inspectionworkJava(jsonParam,"workableBusinessListPage","inspectionwork");
	}

	/**
	 * 单位落实
	 * @param
	 * @return
	 */
	public RespEntity workable(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());

		return inspectionworkJava(jsonParam,"workable","inspectionwork");
	}

	/**
	 * 字典组查询
	 * @param
	 * @return
	 */
	public RespEntity dictList(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return inspectionworkJava(jsonParam,"dictList","inspectionwork");
	}

}
